How to access an external script:
<html>
  <head>
  </head>
<[...]>

<script src="xxx.js">
</script>

<p>The actual script is in an external script file called "xxx.js"</p>

</body>
</html>